package com.org.khtn.gui;

import java.awt.Component;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

public class RowViewRenderer extends JLabel implements TableCellRenderer {

	public RowViewRenderer() {
		super();
		setOpaque(true);
	}

	public Component getTableCellRendererComponent(JTable table, Object value,
			boolean isSelected, boolean hasFocus, int row, int column) {
		if (table.getSelectedRow() == row) {
			setIcon(new ImageIcon("res/images/arrow.gif"));
		} else {
			setIcon(null);
		}
		return this;
	}
}
